@@ -1,6 +1,6 @@ |
||
| 1 | 1 |
{
|
| 2 | 2 |
"name": "hubot-multi-adapter", |
| 3 |
- "version": "0.3.3", |
|
| 3 |
+ "version": "0.3.4", |
|
| 4 | 4 |
"description": "A Hubot adapter that can receive messages thru socket.io or telegram", |
| 5 | 5 |
"main": "src/multi-adapter", |
| 6 | 6 |
"scripts": {
|
@@ -101,15 +101,15 @@ class MultiAdapter extends Adapter |
||
| 101 | 101 |
user.first_name = req.body.user.first_name |
| 102 | 102 |
user.last_name = req.body.user.last_name |
| 103 | 103 |
user.username = req.body.user.username |
| 104 |
+ user.command = command |
|
| 104 | 105 |
user.room = chat_id |
| 105 | 106 |
user.msg_type = req.body.user.msg_type |
| 106 |
- @receive new TextMessage user, text |
|
| 107 |
+ @receive new TextMessage user, command |
|
| 107 | 108 |
res.status(400).send({"message" : "received"})
|
| 108 | 109 |
else |
| 109 | 110 |
res.status(400).send({"message" : "The user object has mising properties. Follow instruction on https://github.com/jamesperet/hubot-multi-adaptor"})
|
| 110 | 111 |
else |
| 111 | 112 |
res.status(200).send({"message" : "Please check the body of your request. Follow instruction on https://github.com/jamesperet/hubot-multi-adaptor"})
|
| 112 |
- res.end() |
|
| 113 | 113 |
|
| 114 | 114 |
@emit 'connected' |
| 115 | 115 |
|